package com.xz.example2.director;

import com.xz.example2.builder.ActorBuilder;
import com.xz.example2.model.Actor;

/**
 * @author 张志航     
 * @version V1.0.0
 * @projectName design_mode
 * @title     ActorController   
 * @package    com.xz.example.director  
 * @date   2019/11/27 19:07  
 * @explain
 */
public class ActorController {

    // 逐步构建复杂的对象
    public Actor construct(ActorBuilder builder){
        Actor actor;
        builder.buildType();
        builder.buildFace();
        builder.buildHairstyle();
        builder.buildCostume();
        builder.buildSex();
        actor = builder.construct();
        return actor;
    }

}
